package com.dg11185.nearshop.net.request;

import com.dg11185.libs.network.http.client.HttpRequest;
import com.dg11185.libs.utils.MD5.MD5Utils;
import com.dg11185.nearshop.app.Constants;
import com.dg11185.nearshop.net.response.AddCardResponse;

/**
 * 添加我的会员卡
 * 
 * @author LWL_Private
 * @date 2014-5-24
 */
public class AddCardRequest extends HttpRequest<AddCardResponse> {

	public AddCardRequest(String loginName, String cardFaceNo, String cardPwd) {
		super(Constants.ADDRESS, Constants.add);
		addParam("loginName", loginName);
		addParam("cardFaceNo", cardFaceNo);
		addParam("cardPwd", cardPwd);
		addParam("chshToken", Constants.TOKEN);
		addParam("chshSign", MD5Utils.getMD5Str(getParams(), Constants.MD5_key));
	}

	@Override
	protected AddCardResponse parseJson(String response) throws Exception {
		AddCardResponse res = new AddCardResponse();
		res.parseJson(response);
		return res;
	}

}
